Optimal. Leaf size=457 \[ -\frac {2 \left (a^2-b^2\right ) \left (16 A b^3-75 a^3 B-24 a b^2 B+6 a^2 b (6 A+7 C)\right ) \sqrt {\frac {b+a \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {\sec (c+d x)}}{315 a^4 d \sqrt {a+b \sec (c+d x)}}-\frac {2 \left (16 A b^4-57 a^3 b B-24 a b^3 B+6 a^2 b^2 (4 A+7 C)-21 a^4 (7 A+9 C)\right ) E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {a+b \sec (c+d x)}}{315 a^4 d \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \sqrt {\sec (c+d x)}}+\frac {2 A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (A b+9 a B) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{63 a d \sec ^{\frac {5}{2}}(c+d x)}-\frac {2 \left (6 A b^2-9 a b B-7 a^2 (7 A+9 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^2 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (8 A b^3+75 a^3 B-12 a b^2 B+a^2 b (13 A+21 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^3 d \sqrt {\sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.10, antiderivative size = 457, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 9, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4179, 4189,
4120, 3941, 2734, 2732, 3943, 2742, 2740} \begin {gather*} -\frac {2 \sin (c+d x) \left (-7 a^2 (7 A+9 C)-9 a b B+6 A b^2\right ) \sqrt {a+b \sec (c+d x)}}{315 a^2 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 \sin (c+d x) \left (75 a^3 B+a^2 b (13 A+21 C)-12 a b^2 B+8 A b^3\right ) \sqrt {a+b \sec (c+d x)}}{315 a^3 d \sqrt {\sec (c+d x)}}-\frac {2 \left (a^2-b^2\right ) \sqrt {\sec (c+d x)} \left (-75 a^3 B+6 a^2 b (6 A+7 C)-24 a b^2 B+16 A b^3\right ) \sqrt {\frac {a \cos (c+d x)+b}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{315 a^4 d \sqrt {a+b \sec (c+d x)}}-\frac {2 \left (-21 a^4 (7 A+9 C)-57 a^3 b B+6 a^2 b^2 (4 A+7 C)-24 a b^3 B+16 A b^4\right ) \sqrt {a+b \sec (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{315 a^4 d \sqrt {\sec (c+d x)} \sqrt {\frac {a \cos (c+d x)+b}{a+b}}}+\frac {2 (9 a B+A b) \sin (c+d x) \sqrt {a+b \sec (c+d x)}}{63 a d \sec ^{\frac {5}{2}}(c+d x)}+\frac {2 A \sin (c+d x) \sqrt {a+b \sec (c+d x)}}{9 d \sec ^{\frac {7}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 3941
Rule 3943
Rule 4120
Rule 4179
Rule 4189
Rubi steps
\begin {align*} \int \frac {\sqrt {a+b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sec ^{\frac {9}{2}}(c+d x)} \, dx &=\frac {2 A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2}{9} \int \frac {\frac {1}{2} (A b+9 a B)+\frac {1}{2} (7 a A+9 b B+9 a C) \sec (c+d x)+\frac {3}{2} b (2 A+3 C) \sec ^2(c+d x)}{\sec ^{\frac {7}{2}}(c+d x) \sqrt {a+b \sec (c+d x)}} \, dx\\ &=\frac {2 A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (A b+9 a B) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{63 a d \sec ^{\frac {5}{2}}(c+d x)}-\frac {4 \int \frac {\frac {1}{4} \left (6 A b^2-9 a b B-7 a^2 (7 A+9 C)\right )-\frac {1}{4} a (47 A b+45 a B+63 b C) \sec (c+d x)-b (A b+9 a B) \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) \sqrt {a+b \sec (c+d x)}} \, dx}{63 a}\\ &=\frac {2 A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (A b+9 a B) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{63 a d \sec ^{\frac {5}{2}}(c+d x)}-\frac {2 \left (6 A b^2-9 a b B-7 a^2 (7 A+9 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^2 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {8 \int \frac {\frac {3}{8} \left (8 A b^3+75 a^3 B-12 a b^2 B+a^2 b (13 A+21 C)\right )+\frac {1}{8} a \left (2 A b^2+207 a b B+21 a^2 (7 A+9 C)\right ) \sec (c+d x)-\frac {1}{4} b \left (6 A b^2-9 a b B-7 a^2 (7 A+9 C)\right ) \sec ^2(c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+b \sec (c+d x)}} \, dx}{315 a^2}\\ &=\frac {2 A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (A b+9 a B) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{63 a d \sec ^{\frac {5}{2}}(c+d x)}-\frac {2 \left (6 A b^2-9 a b B-7 a^2 (7 A+9 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^2 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (8 A b^3+75 a^3 B-12 a b^2 B+a^2 b (13 A+21 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^3 d \sqrt {\sec (c+d x)}}-\frac {16 \int \frac {\frac {3}{16} \left (16 A b^4-57 a^3 b B-24 a b^3 B+6 a^2 b^2 (4 A+7 C)-21 a^4 (7 A+9 C)\right )+\frac {3}{16} a \left (4 A b^3-75 a^3 B-6 a b^2 B-3 a^2 b (37 A+49 C)\right ) \sec (c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+b \sec (c+d x)}} \, dx}{945 a^3}\\ &=\frac {2 A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (A b+9 a B) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{63 a d \sec ^{\frac {5}{2}}(c+d x)}-\frac {2 \left (6 A b^2-9 a b B-7 a^2 (7 A+9 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^2 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (8 A b^3+75 a^3 B-12 a b^2 B+a^2 b (13 A+21 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^3 d \sqrt {\sec (c+d x)}}-\frac {\left (\left (a^2-b^2\right ) \left (16 A b^3-75 a^3 B-24 a b^2 B+6 a^2 b (6 A+7 C)\right )\right ) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+b \sec (c+d x)}} \, dx}{315 a^4}-\frac {\left (16 A b^4-57 a^3 b B-24 a b^3 B+6 a^2 b^2 (4 A+7 C)-21 a^4 (7 A+9 C)\right ) \int \frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {\sec (c+d x)}} \, dx}{315 a^4}\\ &=\frac {2 A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (A b+9 a B) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{63 a d \sec ^{\frac {5}{2}}(c+d x)}-\frac {2 \left (6 A b^2-9 a b B-7 a^2 (7 A+9 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^2 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (8 A b^3+75 a^3 B-12 a b^2 B+a^2 b (13 A+21 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^3 d \sqrt {\sec (c+d x)}}-\frac {\left (\left (a^2-b^2\right ) \left (16 A b^3-75 a^3 B-24 a b^2 B+6 a^2 b (6 A+7 C)\right ) \sqrt {b+a \cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {b+a \cos (c+d x)}} \, dx}{315 a^4 \sqrt {a+b \sec (c+d x)}}-\frac {\left (\left (16 A b^4-57 a^3 b B-24 a b^3 B+6 a^2 b^2 (4 A+7 C)-21 a^4 (7 A+9 C)\right ) \sqrt {a+b \sec (c+d x)}\right ) \int \sqrt {b+a \cos (c+d x)} \, dx}{315 a^4 \sqrt {b+a \cos (c+d x)} \sqrt {\sec (c+d x)}}\\ &=\frac {2 A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (A b+9 a B) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{63 a d \sec ^{\frac {5}{2}}(c+d x)}-\frac {2 \left (6 A b^2-9 a b B-7 a^2 (7 A+9 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^2 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (8 A b^3+75 a^3 B-12 a b^2 B+a^2 b (13 A+21 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^3 d \sqrt {\sec (c+d x)}}-\frac {\left (\left (a^2-b^2\right ) \left (16 A b^3-75 a^3 B-24 a b^2 B+6 a^2 b (6 A+7 C)\right ) \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\frac {b}{a+b}+\frac {a \cos (c+d x)}{a+b}}} \, dx}{315 a^4 \sqrt {a+b \sec (c+d x)}}-\frac {\left (\left (16 A b^4-57 a^3 b B-24 a b^3 B+6 a^2 b^2 (4 A+7 C)-21 a^4 (7 A+9 C)\right ) \sqrt {a+b \sec (c+d x)}\right ) \int \sqrt {\frac {b}{a+b}+\frac {a \cos (c+d x)}{a+b}} \, dx}{315 a^4 \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \sqrt {\sec (c+d x)}}\\ &=-\frac {2 \left (a^2-b^2\right ) \left (16 A b^3-75 a^3 B-24 a b^2 B+6 a^2 b (6 A+7 C)\right ) \sqrt {\frac {b+a \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {\sec (c+d x)}}{315 a^4 d \sqrt {a+b \sec (c+d x)}}-\frac {2 \left (16 A b^4-57 a^3 b B-24 a b^3 B+6 a^2 b^2 (4 A+7 C)-21 a^4 (7 A+9 C)\right ) E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {a+b \sec (c+d x)}}{315 a^4 d \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \sqrt {\sec (c+d x)}}+\frac {2 A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{9 d \sec ^{\frac {7}{2}}(c+d x)}+\frac {2 (A b+9 a B) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{63 a d \sec ^{\frac {5}{2}}(c+d x)}-\frac {2 \left (6 A b^2-9 a b B-7 a^2 (7 A+9 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^2 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (8 A b^3+75 a^3 B-12 a b^2 B+a^2 b (13 A+21 C)\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{315 a^3 d \sqrt {\sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 4 in
optimal.
time = 6.97, size = 5993, normalized size = 13.11 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(6550\) vs.
\(2(475)=950\).
time = 0.52, size = 6551, normalized size = 14.33
method | result | size |
default | \(\text {Expression too large to display}\) | \(6551\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.82, size = 724, normalized size = 1.58 \begin {gather*} \frac {\sqrt {2} {\left (-225 i \, B a^{5} - 3 i \, {\left (13 \, A + 21 \, C\right )} a^{4} b + 96 i \, B a^{3} b^{2} - 12 i \, {\left (3 \, A + 7 \, C\right )} a^{2} b^{3} + 48 i \, B a b^{4} - 32 i \, A b^{5}\right )} \sqrt {a} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) + 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right ) + \sqrt {2} {\left (225 i \, B a^{5} + 3 i \, {\left (13 \, A + 21 \, C\right )} a^{4} b - 96 i \, B a^{3} b^{2} + 12 i \, {\left (3 \, A + 7 \, C\right )} a^{2} b^{3} - 48 i \, B a b^{4} + 32 i \, A b^{5}\right )} \sqrt {a} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) - 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right ) - 3 \, \sqrt {2} {\left (-21 i \, {\left (7 \, A + 9 \, C\right )} a^{5} - 57 i \, B a^{4} b + 6 i \, {\left (4 \, A + 7 \, C\right )} a^{3} b^{2} - 24 i \, B a^{2} b^{3} + 16 i \, A a b^{4}\right )} \sqrt {a} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) + 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right )\right ) - 3 \, \sqrt {2} {\left (21 i \, {\left (7 \, A + 9 \, C\right )} a^{5} + 57 i \, B a^{4} b - 6 i \, {\left (4 \, A + 7 \, C\right )} a^{3} b^{2} + 24 i \, B a^{2} b^{3} - 16 i \, A a b^{4}\right )} \sqrt {a} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) - 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right )\right ) + \frac {6 \, {\left (35 \, A a^{5} \cos \left (d x + c\right )^{4} + 5 \, {\left (9 \, B a^{5} + A a^{4} b\right )} \cos \left (d x + c\right )^{3} + {\left (7 \, {\left (7 \, A + 9 \, C\right )} a^{5} + 9 \, B a^{4} b - 6 \, A a^{3} b^{2}\right )} \cos \left (d x + c\right )^{2} + {\left (75 \, B a^{5} + {\left (13 \, A + 21 \, C\right )} a^{4} b - 12 \, B a^{3} b^{2} + 8 \, A a^{2} b^{3}\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{945 \, a^{5} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{9/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________